package View;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.MouseListener;

import javax.swing.JLabel;
import javax.swing.JPanel;

class ChildPanel extends JPanel {
	private ControlPanel pControl;
	
    public ChildPanel(int id, MouseListener ml) {
    	pControl = new ControlPanel(id, ml);
        setLayout(new BorderLayout());
        add(pControl, "First");
        
    }


   public void addPreviewPanel(JPanel p) {
    	
        //ScreenShotView s = new ScreenShotView(p);
        
	    //add(s);
	    
	    
	    
	    this.revalidate();
	    this.repaint();
    }
    
    public void setTitle(String _title){
    	pControl.titleLabel.setText(_title);
    }

    public Dimension getPreferredSize() {
        return new Dimension(250,200);
    }
}